<!DOCTYPE html>
<html lang="en">
<head>
    <link rel="shortcut icon" href="{% static 'movie/favicon1.ico' %}">
    <link rel="bookmark" href="{% static 'movie/favicon1.ico' %}">
    <meta charset="UTF-8">
    <title>电影</title>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
    <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
    <script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
    <style>
        iframe{
    position: fixed;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    z-index: -1;
    }
        #frame_full {
    height: calc(100% + 2500px);
}
        body {
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
        }
        .navbar {
            margin-bottom: 0;
        }
        .navbar-nav > li > a {
            border: 1px solid transparent;
            padding: 10px 15px;
            margin-right: 10px;
            border-radius: 5px;
        }
        .navbar-nav > li > a:hover,
        .navbar-nav > li > a:focus {
            border-color: #337ab7;
        }
        .navbar-brand {
            margin-left: 10px;
        }
        .navbar-form {
            margin-right: 10px;
        }
        .navbar-right {
            margin-right: 0;
        }
        .navbar-toggle {
            margin-right: 10px;
        }
    </style>
</head>
<body>
<div class="parent-container">
<iframe src="../../static/iframe/log_register/index.html" height="100%" width="100%" id="frame_full" frameborder="0" scrolling="auto"></iframe>
<script>
    function adjustIframeHeight() {
        var iframe = document.getElementById('frame_full');
        if (iframe) {
            iframe.style.height = document.body.clientHeight - 1500 + 'px';
        }
    }
    // 调用函数调整高度
    adjustIframeHeight();
    // 监听窗口大小变化事件
    window.addEventListener('resize', adjustIframeHeight);
</script>
</div>
<nav class="navbar navbar-default navbar-static-top">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        <a class="navbar-brand" href="{% url 'movie:index' %}">首页</a>{#            <a class="navbar-brand" href="{% url 'movie:index' %}" class="btn btn-primary"#}
{#       style="color: white; padding: 3px 3px; background-color: #000dfd; border-radius: 5px;">首页</a>#}
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li><a href="{% url 'movie:hot' %}" class="btn btn-primary" style="color: #000000;">热门电影</a></li>
                <li><a href="{% url 'movie:tag' %}" class="btn btn-primary" style="color: #000000;">电影分类</a></li>
            </ul>
            <form class="navbar-form navbar-left" method="GET" action="{% url 'movie:search' %}">
                <div class="form-group">
                    <input type="search" name="keyword" class="form-control" placeholder="输入电影名称" required>
                </div>
                <button type="submit" class="btn btn-default">搜索</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
            {% if movie_user %}
                <li>
                <a href="{% url 'movie:history' movie_user.id %}" class="btn btn-primary" style="color: #000000;">
                        评分历史
                    </a>
                </li>
                <li>
                    <a href="{% url 'movie:recommend' %}" class="btn btn-primary" style="color: #000000;">查看推荐电影</a>
                </li>
                <li>
                    <a href="{% url 'movie:logout' %}" class="btn btn-primary" style="color: #000000;">退出登录</a>
                </li>
            {% else %}
{#                <li><a href="{% url 'movie:register' %}" class="btn btn-primary" style="color: #000000;">注册</a></li>#}
                <li><a href="{% url 'movie:login' %}" class="btn btn-primary" style="color: #000000;">登录</a></li>
            {% endif %}
             </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>



<div class="container">
    {% block content %}
    {% endblock %}
</div>
</body>


